This page last changed on Aug 07, 2007 by cholmes.

Controlling the description element (balloon pop-up) of your KML

Overview

When GeoServer generates KML for a vector dataset, it attaches information from the data to each Placemark that is created. By default this is a simple HTML table which displays all the attribute data (metadata in KML terms).

In some cases this is not ideal. For instance if some of the attributes of the dataset are sensitive and not to be made public. In this case it is possible to use the KMATTR parameter in a KML request to turn off attribution.

Specifying KMATTR

Specifying KMATTR in a request easy.. All one must do is append the parameter "kmattr=<true|false>" to a KML request. For example:

http://localhost:8080/geoserver/wms/kml_reflect?layers=topp:states*kmattr=false

Attribution with Templates

An alternative to simply turning attribution off is use a template to customize which attributes are attached to a Placemark. Applying templates to KML Placemarks is described in detail here. There is also an in depth tutorial that hits on many of the powerful things one can do.


Document generated by Confluence on Jan 16, 2008 23:28